<template>
    <form ref="form">
      <span>用户名:</span>
      <input type="text" name="username" v-model="form.username">
      <br>
      <span>密码:</span>
      <input type="text" name="password" v-model="form.password">
    </form>
   
</template>
 
<script>
export default {
  name: "FormList",

  data() {
    return {
      form:{
        username:'',
        password:''
      }
    };
  },
  methods: {
    submitForm(){
      console.log(this.form.username,this.form.password);
      this.form.username = ''
      this.form.password = ''
    }
  }
};
</script>

<style scoped>
     
</style>